from flask import Flask,request, render_template


#app = Flask(__name__)
app = Flask(__name__,
            #静态文件目录
            static_folder='./static',
            #静态文件URL前缀，默认为/static
            static_url_path="",
            template_folder='./static')


@app.route('/api/get_vue_chart_data')
def vue_chart():     
    #return ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']
    return ['3', '3', '3', '4', '5', '10']


@app.route('/api/get_vue_chart_data2')
def vue_chart2():     
    #return ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']
    return ['4', '4', '3', '4', '5', '10']



@app.route('/api/get_vue_chart_data_new')
def vue_chart_new():  
    tar_num = int(request.args['num'])   
    #return ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']
    y_data = [5, 20, 36, 10, 10, 20]
    tmp_item = {
        'xAxis': ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子'],
        'yAxis': [item + 5 * tar_num for item in y_data]
    }
    return tmp_item


if __name__ == '__main__':
    app.run(debug=True,host='0.0.0.0',port=25001)